package com.lemon.stock.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey

@Entity(tableName = "stock")
data class Stock (
    @PrimaryKey
    @ColumnInfo(name = "stock_id")val stockId: String,
    @ColumnInfo(name = "stock_name") var stockName: String,
    @ColumnInfo(name = "stock_exchange") val stockExchange: String, //jiaoyisuo
    @ColumnInfo(name = "stock_price") var stockPrice: Float,
    @ColumnInfo(name = "cost_price") var costPrice: Float = 0F,
    @ColumnInfo(name = "hold_stock") var holdStock: Int = 0,
    @ColumnInfo(name = "total_profit") var totalProfit: Float = 0F,
    @ColumnInfo(name = "invest_money") var investMoney: Float = 0F,
    @ColumnInfo(name = "worth_money") var worthMoney: Float = 0F,
    @ColumnInfo(name = "bonus_money") var bonusMoney: Float = 0F,
    @ColumnInfo(name = "commission_money") var commissionMoney: Float = 0F,
    @ColumnInfo(name = "transfer_money") var transferMoney: Float = 0F,
    @ColumnInfo(name = "tax_money") var taxMoney: Float = 0F,
    @ColumnInfo(name = "bonus_tax") var bonusTax: Float = 0F,
    @ColumnInfo(name = "profit_money") var profitMoney: Float = 0F,
    @ColumnInfo(name = "profit_ratio") var profitRatio: Float = 0F,
    @ColumnInfo(name = "buy_line") var buyLine: Float = 0F,
    @ColumnInfo(name = "sell_line") var sellLine: Float = 0F,
    @ColumnInfo(name = "invest_index") var investIndex: Int = 0, //投资批次
    @ColumnInfo(name = "max_amount") var maxAmount: Int = 0,
    @ColumnInfo(name = "total_amount") var totalAmount: Int = 0,
    @ColumnInfo(name = "max_invest") var maxInvest: Float = 0f,
    @ColumnInfo(name = "total_invest") var totalInvest: Float = 0f,
    @ColumnInfo(name = "order_number") var orderNumber: Int = 0,
    @ColumnInfo(name = "follow") var follow: Int = 8,
    @ColumnInfo(name = "status") var status: Int = 8    //6持仓 8观望
){
    //@Ignore
    var firstBuy: Long = 0

    //@Ignore
    var investProfit = 0f
}